Skip to content

feat(git): add model selection for commit message generation#451

Merged
Dimillian merged 4 commits intoDimillian:mainfrom
joshhbk:feature/model-selection-git-commit-messages
Feb 20, 2026
Merged

feat(git): add model selection for commit message generation#451
Dimillian merged 4 commits intoDimillian:mainfrom
joshhbk:feature/model-selection-git-commit-messages

Conversation

@joshhbk
Copy link
Contributor

@joshhbk joshhbk commented Feb 17, 2026

Summary

Currently commit messages are generated with whatever the default model is. Picking one of the cheaper/faster models produces commit messages ~50% faster with similar outputs.

  • Adds a commitMessageModelId setting to AppSettings (Rust + TypeScript) and threads it through the Tauri/daemon RPC layer
  • Adds a model picker to Settings > Git so users can choose which model generates commit messages
  • Validates the saved preference at runtime against the active workspace's available models — falls back to the workspace default when unavailable, without overwriting the persisted setting
  • Reuses the existing codex-section model fetch to avoid duplicate getModelList fan-out in Settings
  • Adds formatModelSlug to produce consistently formatted display names from model slugs (e.g. gpt-5.3-codexGPT-5.3-Codex)

Test plan

  • Open Settings > Git and verify the model dropdown appears below the commit message prompt
  • Select a non-default model, generate a commit message, and confirm the selected model is used
  • Restart the app and verify the model selection persists
  • Switch to a workspace that doesn't expose the saved model — commit message generation should fall back to the workspace default without clearing the saved preference
  • Switch back to the original workspace — the saved model should be active again
  • Run vitest — tests for effectiveCommitMessageModelId, formatModelSlug, and parseModelListResponse should pass

Demo

Screen.Recording.2026-02-19.at.2.30.09.PM_compressed.mov

@joshhbk joshhbk force-pushed the feature/model-selection-git-commit-messages branch from 3a8bedc to 6d41bb0 Compare February 17, 2026 23:13
@ModerIRAQ
Copy link

YES PLS!!

@Dimillian
Copy link
Owner

Dimillian commented Feb 18, 2026

Why do we want that? It's adding complexity for a magic feature

@joshhbk
Copy link
Contributor Author

joshhbk commented Feb 18, 2026

Why do we want that? It's adding complexity for a magic feature

I've found the feature itself to be helpful but that using the same model I was using for feature work to be slow (sometimes it takes 7-8s) + felt like overkill for something so small that doesn't involve any real complexity. My assumption is that using a smaller model in this case also saves on usage for users on a budget.

I had considered rewiring it to just pick a smaller model but I feel like that would potentially be more complex/error prone.

Maybe it would be cleaner if this was tucked away in Settings instead of at the usage site?

@Dimillian
Copy link
Owner

@joshhbk Yeah I think it should be a settings in the git section probably

Allow users to choose which model generates commit messages via a
dropdown in the git diff panel. The selection persists in app settings
and falls back to the workspace default when the chosen model is no
longer available.
@joshhbk joshhbk force-pushed the feature/model-selection-git-commit-messages branch 3 times, most recently from 4d24982 to bd82a9d Compare February 19, 2026 20:35
Move the commit-message model dropdown from the git diff panel to
Settings > Git. Source the model list from the existing codex-section
fetch to avoid duplicate getModelList fan-out.

Replace the old normalize-and-persist hook with a pure runtime guard
(effectiveCommitMessageModelId) that validates the saved preference
against the active workspace's models without overwriting the persisted
setting — so switching workspaces no longer silently clears the choice.
@joshhbk joshhbk force-pushed the feature/model-selection-git-commit-messages branch from bd82a9d to 8bd315f Compare February 19, 2026 20:57
@joshhbk
Copy link
Contributor Author

joshhbk commented Feb 19, 2026

@Dimillian updated!

@Dimillian
Copy link
Owner

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3572101173

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Dimillian Dimillian merged commit 00179de into Dimillian:main Feb 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments